package com.sdtw.bookshop.shop.mapper;

import com.sdtw.bookshop.shop.bean.BookTypeInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BookTypeMapper {
    @Select("select * from booktype")
    @Results({
            @Result(property = "bkid",column = "bkid",id = true),
            @Result(property = "typeName",column = "typeName"),
            @Result(property = "createTime",column = "createTime"),
            @Result(property = "bookKindInfo",column = "kindId",one=@One(select ="com.sdtw.bookshop.shop.mapper.BookKindMapper.findById"))
    })
    List<BookTypeInfo> find();

}
